import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { ExtractComponent } from './extract.component';
import { ExtractTemplateComponent } from './components/extract-template/extract-template.component';
import { ExtractDatasetComponent } from './components/extract-dataset/extract-dataset.component';
import { ExtractTagComponent } from './components/extract-tag/extract-tag.component';
import { ExtractTagEditComponent } from './components/extract-tag-edit/extract-tag-edit.component';
import { ExtractModelComponent } from './components/extract-model/extract-model.component';
import { ExtractTrainComponent } from './components/extract-train/extract-train.component';
import { ModelAssessmentComponent } from './components/model-assessment/model-assessment.component';
import { AppAssessmentComponent } from './components/app-assessment/app-assessment.component';
import { ModelDeployComponent } from './components/model-deploy/model-deploy.component';

import { AicompetenceComponent } from '../aicompetence/aicompetence.component';

const routes: Routes = [{
  path: 'extract',
  redirectTo: ''
},
{
  path: '',
  component: AicompetenceComponent,
  children: [    
    {
      path: '',
      component: ExtractComponent,
      children: [    
        { path: 'extractTemplate', component: ExtractTemplateComponent },
        { path: 'extractDataset', component: ExtractDatasetComponent },
        { path: 'extractTag/:id', component: ExtractTagComponent },
        { path: 'extractTagEdit', component: ExtractTagEditComponent },
        { path: 'extractModel', component: ExtractModelComponent },
        { path: 'extractTrain', component: ExtractTrainComponent },
        { path: 'extractModelAssessment', component: ModelAssessmentComponent },
        { path: 'extractAppAssessment', component: AppAssessmentComponent },
        { path: 'extractDeploy', component: ModelDeployComponent },
        { path: '**', redirectTo: 'extractTemplate' }
      ]
       
    }
  ]
   
}, {
  path: '**',
  redirectTo: 'extract'
}
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class ExtractRoutingModule { }